ActionController::Routing::Routes.draw do |map|
  # /
  map.home '', :controller => "blog"
  
  # /blog
  map.tagged_blog 'blog/tagged/:tag', 
    :controller => "blog", :action => "index"
  map.blog_search 'blog/search', 
    :controller => "blog", :action => "search"
  map.blog 'blog/:year/:month/:day/:title', 
    :controller => "blog", :action => "index_by_date", 
    :year => nil, :month => nil, :day => nil, :title => nil
  map.comments_new 'comments/new',
    :controller => "comments", :action => "new"
    
  # /photos
  map.photos 'photos',
    :controller => "photos", :action => "index"
  map.photos_with_pages 'photos/:page',
    :controller => "photos", :action => "index", :page => /\d{1,2}/
  map.photos_by_date 'photos/:year/:month/:day', 
    :controller => "photos", :action => "index_by_date", 
    :year => /20\d{2}/, :month => nil, :day => nil
  map.photo_set 'photos/:canonical_name', 
    :controller => "photos", :action => "canonical", :canonical_name => nil
    
  # /goals
  map.goals 'goals/:id',
    :controller => "goals", :action => "index", :id => nil

  # /ratings
  map.ratings 'ratings',
    :controller => "ratings", :action => "index", :type => nil
  map.ratings_content 'ratings/content',
    :controller => "ratings", :action => "content"
    
  # /about
  map.connect 'about', :controller => "about", :action => "index"
    
  # /feed || /rss
  map.connect 'feed', :controller => "feed", :action => "blog"
  map.rss 'rss', :controller => "feed", :action => "blog", :format => "rss"
    
  # /admin
  map.connect 'admin', :controller => "admin"
  map.admin_blog_edit 'admin/blog/:id',
    :controller => "admin", :action => "blog", :id => nil
  map.admin_photos_upload 'admin/photos/upload',
    :controller => "admin", :action => "photos_upload"
  map.admin_photos_edit 'admin/photos/:type/:id',
    :controller => "admin", :action => "photos", :type => nil, :id => nil
  map.admin_goals_edit 'admin/goals/:id',
    :controller => "admin", :action => "goals", :id => nil
  map.admin_goals_track 'admin/goals_track/:page',
    :controller => "admin", :action => "goals_track", :page => nil
  map.admin_goals_cp_update 'admin/goal_checkpoint_update/:id/:state',
    :controller => "admin", :action => "goal_checkpoint_update"
  map.admin_get_attachables 'admin/get_attachables/:type',
    :controller => "admin", :action => "get_attachables"
  
  # Install the default routes as the lowest priority.
  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'
  

end
